<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body >
	<script src="static/layui/lay/modules/form.js"></script>
	
		<fieldset class="layui-elem-field layui-field-title site-title">
			<legend>
				<a name="fixbar">我的信息</a>
			</legend>
		</fieldset>
	<div class="layui-col-xs6 layui-col-md12" style="text-align: center;" id="studentdiv">
		<div class="layui-form-item">
			<div class="layui-inline">
				<div class="layui-input-block">
					<div class="layui-upload-drag" >
						<c:if test="${model.fileuuid==null }">
							<i class="layui-icon">&#xe67c;</i>
							<p>点击编辑上传您的图片吧</p>
						</c:if>
						<c:if test="${model.fileuuid!=null }">
							<img alt="" src="download?uuid=${model.fileuuid }" width="100px"
								height="100px" title="点击重新选择">
						</c:if>

					</div>
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">姓名</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" value="${model.name}"
						lay-verify="required" required autocomplete="off"
						placeholder="无" class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">班级</label>
				<div class="layui-input-inline">
						<input readonly="readonly" type="text" value="${model.tbClass.name}"
						lay-verify="required" required autocomplete="off"
						placeholder="无" class="layui-input">
					<%-- <select name="tbClass.id">
						<option value=""></option>
						<c:forEach items="${bjs}" var="bj">
							<option value="${bj.id}" ${model.tbClass.id==bj.id?'selected':''}>${bj.name}</option>
						</c:forEach>
					</select> --%>
				</div>
				
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">身份证号</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" value="${model.idcode}"
						lay-verify="required" required autocomplete="off"
						placeholder="无" class="layui-input" onclick="tupian()">
				</div>
			</div>
		
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">性别</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text"  value="${model.sex}"
						lay-verify="required" required autocomplete="off"
						placeholder="无" class="layui-input">
					<%-- <select name="sex" >
						<option value="男" <c:if test="${model.sex=='男'}">selected</c:if>>男</option>
						<option value="女" <c:if test="${model.sex=='女'}">selected</c:if>>女</option>
					</select> --%>
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">民族</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" value="${model.nation}"
						lay-verify="required" required autocomplete="off" placeholder="民族"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">政治面貌</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" value="${model.politics}"
						lay-verify="required" required autocomplete="off"
						placeholder="无" class="layui-input">
				</div>
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">文化程度</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" value="${model.degree}"
						lay-verify="required" required autocomplete="off"
						placeholder="无" class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">开班日期</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" class="layui-input" id="bron"
						value="${model.bron}">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">邮箱</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" value="${model.email}" required
						autocomplete="off" placeholder="无" class="layui-input">

				</div>
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">办公电话</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" value="${model.officetel}"
						required autocomplete="off" placeholder="无" class="layui-input">

				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">现任职务</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" value="${model.job}" required
						autocomplete="off" placeholder="无" class="layui-input">

				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">职级</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" value="${model.jobLevel}"
						required autocomplete="off" placeholder="无" class="layui-input">

				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">邮政编码</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text"  value="${model.postalCode}"
						required autocomplete="off" placeholder="无" class="layui-input">

				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">专业职称</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" value="${model.speciality}"
						required autocomplete="off" placeholder="无"
						class="layui-input">

				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">组号</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text"  value="${model.siteNumber}"
						required autocomplete="off" placeholder="无" class="layui-input">

				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">车牌号</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" value="${model.carnumber}"
						required autocomplete="off" placeholder="无" class="layui-input">

				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">班级职务</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text"  value="${model.position}"
						required autocomplete="off" placeholder="无" class="layui-input">

				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">地址</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" value="${model.address}"
						autocomplete="off" placeholder="无" class="layui-input">
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">电话号码</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" value="${model.phone}"
						autocomplete="off" placeholder="无" class="layui-input">
				</div>
			</div>
			<div class="layui-inline" >
				<label class="layui-form-label">工作单位</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" value="${model.workUnit}"
						autocomplete="off" placeholder="无" class="layui-input">
				</div>
			</div>
			
			<div class="layui-inline" >
				<label class="layui-form-label">库区移民</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" value="${model.isimmigrant}" autocomplete="off" placeholder="无" class="layui-input">
				</div>
			</div>
			
		</div>
		<div class="layui-row">
			<div class="layui-col-md4 layui-col-md-offset7">
				<button class="layui-btn layui-btn-danger" onclick="studentdiv()">编辑</button>
			</div>
		</div>
	</div>
	
	
	
	<form class="layui-form white-bg radius" action="student/save" method="post" id="studentform" style="text-align: center;display: none;" >
		<input readonly="readonly" type="hidden" name="id" value="${model.id}"> 
			<input readonly="readonly" type="hidden" name="fileuuid" value="${model.fileuuid}" id="fileuuid">
		<%-- <input readonly="readonly" type="hidden" name="tbClass.id" value="${model.tbClass.id}"> --%>
		<div class="layui-form-item">
			<div class="layui-inline">
				<div class="layui-input-block" id="layuiUp">
					<div class="layui-upload-drag" id="fileuuidhtmlup">
						<c:if test="${model.fileuuid==null }">
							<i class="layui-icon">&#xe67c;</i>
							<p>点击上传，或将文件拖拽到此处</p>
						</c:if>
						<c:if test="${model.fileuuid!=null }">
							<img alt="" src="download?uuid=${model.fileuuid }" width="100px"
								height="100px" title="点击重新选择">
						</c:if>

					</div>
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">班级</label>
				<div class="layui-input-inline">
						<input readonly="readonly" type="text" name="tbClass.id" value="${model.tbClass.name}"
						lay-verify="required" required autocomplete="off"
						placeholder="请选择班级" class="layui-input">
					<%-- <select name="tbClass.id">
						<option value=""></option>
						<c:forEach items="${bjs}" var="bj">
							<option value="${bj.id}" ${model.tbClass.id==bj.id?'selected':''}>${bj.name}</option>
						</c:forEach>
					</select> --%>
				</div>
				
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">身份证号</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" name="idcode" value="${model.idcode}"
						lay-verify="required" required autocomplete="off"
						placeholder="请输入身份证号" class="layui-input" onclick="tupian()">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">姓名</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" name="name" value="${model.name}"
						lay-verify="required" required autocomplete="off"
						placeholder="请输入姓名" class="layui-input">
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">性别</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" name="sex" value="${model.sex}"
						lay-verify="required" required autocomplete="off"
						placeholder="请选择" class="layui-input">
					<%-- <select name="sex" >
						<option value="男" <c:if test="${model.sex=='男'}">selected</c:if>>男</option>
						<option value="女" <c:if test="${model.sex=='女'}">selected</c:if>>女</option>
					</select> --%>
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">民族</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" name="nation" value="${model.nation}"
						lay-verify="required" required autocomplete="off" placeholder="选择民族"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">政治面貌</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" name="politics" value="${model.politics}"
						lay-verify="required" required autocomplete="off"
						placeholder="政治面貌" class="layui-input">
				</div>
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">文化程度</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" name="degree" value="${model.degree}"
						lay-verify="required" required autocomplete="off"
						placeholder="政治面貌" class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">开班日期</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" class="layui-input" id="bron" name="bron"
						value="${model.bron}">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">邮箱</label>
				<div  class="layui-input-inline">
					<input  type="text" name="email" value="${model.email}" required
						autocomplete="off" placeholder="请输入邮箱" class="layui-input">

				</div>
			</div>
		</div>

		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">办公电话</label>
				<div  class="layui-input-inline">
					<input type="text" name="officetel" value="${model.officetel}"
						required autocomplete="off" placeholder="请输入办公电话" class="layui-input">

				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">现任职务</label>
				<div  class="layui-input-inline">
					<input type="text" name="job" value="${model.job}" required
						autocomplete="off" placeholder="请输入现任职务" class="layui-input">

				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">职级</label>
				<div  class="layui-input-inline">
					<input type="text" name="jobLevel" value="${model.jobLevel}"
						required autocomplete="off" placeholder="请输入职级" class="layui-input">

				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">邮政编码</label>
				<div  class="layui-input-inline">
					<input type="text" name="postalCode" value="${model.postalCode}"
						required autocomplete="off" placeholder="请输入邮政编码" class="layui-input">

				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">专业职称</label>
				<div  class="layui-input-inline">
					<input type="text" name="speciality" value="${model.speciality}"
						required autocomplete="off" placeholder="请输入专业技术职称"
						class="layui-input">

				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">组号</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" name="siteNumber" value="${model.siteNumber}"
						required autocomplete="off" placeholder="请输入组号" class="layui-input">

				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">车牌号</label>
				<div  class="layui-input-inline">
					<input type="text" name="carnumber" value="${model.carnumber}"
						required autocomplete="off" placeholder="请输入车牌号" class="layui-input">

				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">班级职务</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" name="position" value="${model.position}"
						required autocomplete="off" placeholder="请输入班级职务" class="layui-input">

				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">地址</label>
				<div  class="layui-input-inline">
					<input type="text" name="address" value="${model.address}"
						autocomplete="off" placeholder="请输入职务" class="layui-input">
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">电话号码</label>
				<div  class="layui-input-inline">
					<input type="text" name="phone" value="${model.phone}"
						autocomplete="off" placeholder="请输入职务" class="layui-input">
				</div>
			</div>
			<div class="layui-inline" >
				<label class="layui-form-label">工作单位</label>
				<div  class="layui-input-inline">
					<input type="text" name="workUnit" value="${model.workUnit}"
						autocomplete="off" placeholder="请输入职务" class="layui-input">
				</div>
			</div>
			
			<div class="layui-inline" >
				<label class="layui-form-label">库区移民</label>
				<div  class="layui-input-inline">
					<input readonly="readonly" type="text" name="isimmigrant" value="${model.isimmigrant}" autocomplete="off" placeholder="是否库区移民" class="layui-input">
				</div>
			</div>
			
		</div>
		<div class="layui-row">
			<div class="layui-col-md4 layui-col-md-offset7">
				<button class="layui-btn layui-btn-normal" lay-submit lay-filter="formDemo1">保存</button>
				<a class="layui-btn layui-btn-normal" onclick="studentformqx()">取消</a>
			</div>
		</div>
	</form>
	<script type="text/javascript">
	
	</script>
	<script type="text/javascript">
		function studentdiv(){
			$("#studentdiv").hide(200);
			$("#studentform").show();
		}
		function studentformqx(){
			$("#studentform").hide();
			$("#studentdiv").show(200);
		}
		var form = layui.form;
		
	</script>
	<script>
  	layui.use('upload', function(){
        var upload = layui.upload;
        //执行实例
        var uploadInst = upload.render({
            elem: '#fileuuidhtmlup' //绑定元素
            ,url: 'toFilesave' //上传接口
            ,done: function(res){
                if(res.success){
                	$("#fileuuid").val(res.msg);
                	$("#fileuuidhtmlup").html('<img alt="" src="download?uuid='+res.msg+'" width="100px" height="100px" title="点击重新选择">' );
                }else{
                	layer.open({
                		title: '上传失败'
                		,content: res.msg
                		,time: 2000
                	});   
                }
            }
            ,error: function(){
                
            }
        });
    });
</script>


</body>
</html>